<%+cbi/valueheader%>
<script type="text/javascript">
	var EU868_RXDR1OFFSET = [0, 1, 2, 3, 4, 5];
	var CN470_RXDR1OFFSET = [0, 1, 2, 3, 4, 5];
	var EU433_RXDR1OFFSET = [0, 1, 2, 3, 4, 5];
	var IN865_RXDR1OFFSET = [0, 1, 2, 3, 4, 5, 6, 7];
	var AS923_RXDR1OFFSET = [0, 1, 2, 3, 4, 5, 6, 7];
	var KR920_RXDR1OFFSET = [0, 1, 2, 3, 4, 5];
	var US915_RXDR1OFFSET = [0, 1, 2, 3];
	var AU915_RXDR1OFFSET = [0, 1, 2, 3, 4, 5];
	var RU864_RXDR1OFFSET = [0, 1, 2, 3, 4, 5];
	
	function appendDrOffset(region, val){
		var drOffsetMaxObj = $("#cbid\\.lorasrv\\.lorasrv\\.Rx1DrOffset");
		drOffsetMaxObj.html("");
		eval(region + "_RXDR1OFFSET").forEach(function(v, i){
			drOffsetMaxObj.append("<option value='"+v+"'>"+v+"</option>")
		});
		if( val ){
			drOffsetMaxObj.val(val);
		}
	}
	$(document).ready(function(){
		var regObj = $("#cbid\\.lorasrv\\.lorasrv\\.band");
		var region = regObj.val();
		regObj.change(function(){
			appendDrOffset(regObj.val());
		});
		appendDrOffset(region, <%=tostring(self:cfgvalue(section) or self.default)%>)
	})
</script>
<select class="cbi-input-select" onchange="cbi_d_update(this.id)"<%= attr("id", cbid) .. attr("name", cbid) .. ifattr(self.size, "size") %>>
</select>
<%+cbi/valuefooter%>